package com.example.teacher.Service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.common.domain.pojo.Homework;
import com.example.common.domain.pojo.HomeworkStudent;
import com.example.common.domain.pojo.StudentAnswers;
import com.example.teacher.domain.vo.HomeworkSatatus;
import com.example.teacher.domain.vo.HomeworkSatatusVo;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface HomeworkStudentService extends IService<HomeworkStudent> {


    //作业状态
    HomeworkSatatus getHomeworkStatus(String homeworkId);

    //学生某一次作业列表
    Page<HomeworkStudent> getHomeworkByStudent(String homeworkId, Integer pageNum, Integer pageSize);

    boolean saveAllHomeworkStudent(Homework homework);


    HomeworkSatatusVo getHomeworkStatus2(String homeworkId, Integer pageNum, Integer pageSize, String sortType);

    //老师修改单个学生作业
    @Transactional
    void saveOrUpdateHomeworkStudent(HomeworkStudent homeworkStudent, List<StudentAnswers> studentAnswers);


}
